<?xml version="1.0" encoding="utf-8"?>
<!-- DWXMLSource="/a.xml" -->
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" encoding="utf-8"/>
  <xsl:param name="param"/>
  <xsl:template name="main" match="/">
    <xsl:param name="pid"/>
    <xsl:variable name="topid">
    <xsl:choose>
      <xsl:when test="$pid=''">0</xsl:when>
      <xsl:otherwise><xsl:value-of select="$pid"/></xsl:otherwise>
    </xsl:choose>
    </xsl:variable>
    <ul>
      <xsl:if test="$pid=''">
        <xsl:attribute name="class">MenuBarHorizontal</xsl:attribute>
        <xsl:attribute name="id"><xsl:value-of select="$param"/></xsl:attribute>
      </xsl:if>
      <xsl:for-each select="//rows/row[TopID=$topid]">
        <xsl:variable name="mid" select="MID"/>
        <xsl:variable name="target"><xsl:value-of select="MTarget"/>
        <xsl:if test="MTarget=''">
          iWindow
        </xsl:if>
        </xsl:variable>
        <li><a target="{$target}">
          <xsl:if test="MURL!='' and MFlag=1">
            <xsl:attribute name="href"><xsl:value-of select="MURL"/></xsl:attribute>
            <xsl:attribute name="onclick">myTitle('<xsl:value-of select="MText"/>')</xsl:attribute>
          </xsl:if>
          <xsl:if test="MFlag=0 or MURL=''">
            <xsl:attribute name="class">disabled</xsl:attribute>
          </xsl:if>
          <xsl:if test="count(//rows/row[TopID=$mid])&gt;0">
            <xsl:attribute name="class">MenuBarItemSubmenu</xsl:attribute>
          </xsl:if>
          <xsl:if test="MIco!=''">
            <xsl:attribute name="style">background-image:url(<xsl:value-of select="MIco"/>);background-position:2px center; background-repeat:no-repeat</xsl:attribute>
          </xsl:if>
          <xsl:value-of select="MText"/></a>
          <xsl:if test="count(//rows/row[TopID=$mid])&gt;0">
            <xsl:call-template name="main">
              <xsl:with-param name="pid" select="MID"/>
              
            </xsl:call-template>
          </xsl:if>
        </li>
      </xsl:for-each>
    </ul>
  </xsl:template>
</xsl:stylesheet>
